package lab01;

/**
 * Created by Administrator on 2017/9/30.
 */

import jdk.management.resource.internal.inst.FileOutputStreamRMHooks;

import java.text.Format;

/**
 * Created by Administrator on 2017/9/29.
 */
public class Test10 {
    public static void main(String[] args) {
        String[] s = new String[]{"A", "B", "C", "D", "E", "F",
                "G", "H", "I", "J", "K", "L", "M",
                "N", "O", "P", "Q", "R", "S", "T"};
        //建立一个字母数组

        int i;
        int j;
        int k;
        //

        int num1 = 0;
        int num2 = 10;
        //

        for (i = 1; i < 5; i++) {
            for (j = 0; j < 4 - i; j++) {
                System.out.print(" ");
            }//
            for (k = 0; k < i; k++) {
                System.out.print(s[num1]);
                System.out.print(" ");
                num1++;
            }
            System.out.println();
        }
        for (i = 1; i < 5; i++) {
            for (j = 1; j < i; j++) {
                System.out.print(" ");
            }
            for (k = 5; k > i; k--) {
                System.out.print(s[num2]);
                System.out.print(" ");
                num2++;
            }
            System.out.println();
        }
    }
}